<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文章列表</title>
    <style>
        body {
            font-family: 'Courier New', Courier, monospace;
            background-color: #000;
            color: #00ff00;
            text-align: center;
            margin: 0;
            padding: 0;
        }
        .header {
            padding: 20px;
            background-color: #001f3f;
            position: relative;
        }
        .header h1 {
            margin: 0;
            font-size: 3em;
            display: inline-block;
        }
        .header .auth-buttons {
            position: absolute;
            top: 20px;
            right: 20px;
        }
        .header .auth-button {
            background-color: #00ff00;
            color: #000;
            border: none;
            padding: 10px 20px;
            font-size: 1em;
            cursor: pointer;
            margin-left: 10px;
        }
        .main-content {
            padding: 20px;
        }
        .main-content h2 {
            font-size: 2em;
        }
        .main-content p {
            font-size: 1.2em;
        }
        .footer {
            padding: 10px;
            background-color: #001f3f;
            position: fixed;
            bottom: 0;
            width: 100%;
        }
        .footer p {
            margin: 0;
            font-size: 1em;
        }
        .glow {
            text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00, 0 0 40px #00ff00;
        }
        .article-list {
            list-style-type: none;
            padding: 0;
        }
        .article-list li {
            margin: 10px 0;
        }
        .article-list a {
            color: #00ff00;
            text-decoration: none;
        }
        .article-list a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="header">
        <h1 class="glow">文章列表</h1>
        <div class="auth-buttons">
            <button class="auth-button" onclick="location.href='/article/create'">新增文章</button>
        </div>
    </div>
    <div class="main-content">
        <ul class="article-list">
            {% for article in articles %}
                <li>
                    <a href="{{ url_for('article.article', id=article.id)}}">{{ article.title }}</a>
                    <form action="{{ url_for('article.delete', id=article.id) }}" method="post" style="display:inline;">
                        <button class="auth-button" type="submit">删除</button>
                    </form>
                    <a class="auth-button" href="{{ url_for('article.edit', id=article.id) }}">编辑</a>
                </li>
            {% endfor %}
        </ul>
    </div>
    <div class="footer">
        <p class="glow">版权所有 &copy; 2025 未来之城</p>
    </div>
</body>
</html>
